package com.ruoyi.common.core.server;

import com.ruoyi.common.annotation.AddDataScope;
import com.ruoyi.common.annotation.SelectDataScope;
import com.ruoyi.common.core.mapper.BaseMapper;
import java.util.List;

/**
 * 证书申请发放（成绩）Service业务层处理
 *
 * @author 众智汇云研发部
 * @date 2021-01-26
 */
public class BaseService<T> {

    protected BaseMapper<T> myBaseMapper;

    /**
     * 根据id查询证书
     */
    public T selectById(String acaId) {
        return myBaseMapper.selectById(acaId);
    }

    /**
     * 查询列表
     */
    @SelectDataScope
    public List<T> selectList(T t) {
        return myBaseMapper.selectList(t);
    }

    /**
     * 新增
     */
    @AddDataScope
    public int insert(T t) {
        return myBaseMapper.insert(t);
    }

    /**
     * 修改
     */
    public int update(T t) {
        return myBaseMapper.update(t);
    }

    /**
     * 批量删除
     */
    public int deleteByIds(Long[] acaIds) {
        return myBaseMapper.deleteByIds(acaIds);
    }

}
